//根据选择的圣遗物部件来生成主词条下拉选项
function ShowMainEntry(name) {
    document.getElementById("mainEntry").innerHTML = `<option value=""></option>`;
    if (name == "生之花") {
        let mainEntryOption = document.createElement("option");
        mainEntryOption.value = "生命值";
        mainEntryOption.innerHTML = "生命值";
        mainEntryOption.selected = true;
        document.getElementById("mainEntry").appendChild(mainEntryOption);
    }
    else if (name == "死之羽") {
        let mainEntryOption = document.createElement("option");
        mainEntryOption.value = "攻击力";
        mainEntryOption.innerHTML = "攻击力";
        mainEntryOption.selected = true;
        document.getElementById("mainEntry").appendChild(mainEntryOption);
    }
    else if(name == "时之沙") {
        let arrs = ["生命值", "攻击力", "防御力", "元素充能", "元素精通"];
        for (let i = 0; i < arrs.length; i++) {
            let mainEntryOption = document.createElement("option");
            mainEntryOption.value = arrs[i];
            mainEntryOption.innerHTML = arrs[i];
            document.getElementById("mainEntry").appendChild(mainEntryOption);
        }
    }
    else if(name == "空之杯") {
        let arrs = ["生命值", "攻击力", "防御力", "元素伤害", "元素精通", "物理伤害"];
        for (let i = 0; i < arrs.length; i++) {
            let mainEntryOption = document.createElement("option");
            mainEntryOption.value = arrs[i];
            mainEntryOption.innerHTML = arrs[i];
            document.getElementById("mainEntry").appendChild(mainEntryOption);
        }
    }
    else { //理之冠
        let arrs = ["生命值", "攻击力", "防御力", "暴击率", "暴击伤害", "治疗加成", "元素精通"];
        for (let i = 0; i < arrs.length; i++) {
            let mainEntryOption = document.createElement("option");
            mainEntryOption.value = arrs[i];
            mainEntryOption.innerHTML = arrs[i];
            document.getElementById("mainEntry").appendChild(mainEntryOption);
        }
    }
}